package kuoge.practice.kafka.stream.member.rfm;

import java.util.concurrent.TimeUnit;

/**
 * @Description
 */
public class RfmLauncher {
    public static void main(String[] args) throws InterruptedException {
        final OrderCompletedEventProducer sender = new OrderCompletedEventProducer();
        sender.startSendEvent();

        final MemberRFMConsumer memberRFMStreamService = new MemberRFMConsumer();
        memberRFMStreamService.startStreamConsume();
        memberRFMStreamService.startConsume();

        System.out.println("start success");

        TimeUnit.SECONDS.sleep(10);
        sender.stopSendEvent();
        memberRFMStreamService.stopStreamConsume();
        memberRFMStreamService.stopConsume();

        System.out.println("stop success");
    }
}
